package com.team24.hotel.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class WebConfig implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        LoginInterceptor interceptor=new LoginInterceptor();
        registry.addInterceptor(interceptor)
                .addPathPatterns("/**")
                .excludePathPatterns("/adminlte/**","/bootstrap-table/**","/front-resource/**","/img/**","/js/**","/layui/**"
                        ,"/login/**","/index/toFront","/register/**","/hotel/display","/hotel/detail","/user/checkRegister","/user/checkRegister1");
    }
}
